unit Unitcfsl;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Unitcf, cxGraphics, cxControls, cxLookAndFeels,
  cxLookAndFeelPainters, cxContainer, cxEdit, dxSkinsCore, dxSkinscxPCPainter, 
  cxDataStorage, DB, cxDBData, cxTextEdit,
  cxCurrencyEdit, DBAccess, Uni, MemDS, VirtualTable, StdCtrls,
  cxGridLevel, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
  cxClasses, cxGridCustomView, cxGrid, cxLabel, cxGroupBox,
  dxSkinsDefaultPainters, dxSkinOffice2010Blue, cxStyles,
  cxCustomData, cxFilter, cxData;
type
  TFcfsl = class(TFcf)
    procedure vtDSDesigner4Change(Sender: TField);
    procedure vtDSDesigner6Change(Sender: TField);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Fcfsl: TFcfsl;

implementation
uses gdata;
{$R *.dfm}

procedure TFcfsl.vtDSDesigner4Change(Sender: TField);
begin
 if VarIsNull(vtDSDesigner4.Value) or VarIsNull(vtDSDesigner5.Value) then Exit;
    vtDSDesigner6.Value:=vtDSDesigner4.Value*vtDSDesigner5.Value;
end;

procedure TFcfsl.vtDSDesigner6Change(Sender: TField);
begin
   if VarIsNull(vtDSDesigner6.Value) or VarIsNull(vtDSDesigner7.Value) then Exit;
if dlinfo.taxflag then
   vtDSDesigner8.Value:=vtDSDesigner6.Value/(vtDSDesigner7.Value+1)*vtDSDesigner7.Value
   else
   vtDSDesigner8.Value:=vtDSDesigner6.Value*vtDSDesigner7.Value;
end;

end.
